<?php

namespace app\http\middleware;

use app\index\common\BaseController;
use think\facade\Cache;
use think\facade\Request;

class Check extends BaseController
{
    public function handle($request, \Closure $next)
    {
        if (!Cache::get(Request::header('Authorization'))){
            return $this->returnJson(self::LOGON,'请先登录');
        }
        return $next($request);
    }
}
